<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <include file="./Public/Admin/header.html" />
    <style>
        .form-horizontal .control-group {
            margin-bottom: 10px;
        }

        .input-medium {
            width: 330px;
        }

        #keyword {
            width: 323px;
        }
        .span2{margin-bottom: 10px;}
        .span12{overflow: hidden;}
        .span12 .span5{float:left;width: 30%;}
    </style>
</head>
<body>
<div id="main">
    <div class="container-fluid">

        <div class="row-fluid">
            <div class="span12">
                <div class="box">
                    <div class="box-title">
                        <div class="span4">
                            <h3><i class="icon-edit"></i>用户列表</h3>
                        </div>
                    </div>

                    <div class="box-content">

                        <div class="row-fluid">
                            <div class="span10 control-group">
                                <div class="span2" style="width: 100%;">
                                    <a class="btn" href="{:U('admin/User/addUser')}"><i class="icon-plus"></i>添加会员</a>
                                    <a class="btn" href="javascript:location.reload()"><i class="icon-refresh"></i>刷新</a>
                                </div>
                                <div class="btn-group pull-right clearfix " style="float: left;">
                                    <form action="{:U('admin/User/index')}" method="get" class="form-horizontal" style="margin: 0px;">
                                            <div class="span10"> <input type="text" id="keyword" name="keyword" value="<?php echo $_GET['keyword'] ?>" class="input-small-z" placeholder="请输入姓名、电话号码" /></div>
                                        <button class="btn" id="btn_search">查询</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                        <div class="row-fluid dataTables_wrapper">
                            <table id="listTable" class="table table-bordered table-hover  dataTable">
                                <thead>
                                <tr>
                                    <th class='with-checkbox'>
                                        <input type="checkbox" class="check_all" /></th>
                                    <th >姓名</th>
                                    <th>电话号码</th>
                                    <th>性别</th>
                                    <th>身份证号码</th>
                                    <th>家庭住址</th>
                                    <th>现有余额</th>
                                    <th>现有积分</th>
                                    <th>注册时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <foreach name="list" item="v">
                                    <tr>
                                        <td class="with-checkbox">
                                            <input type="checkbox" name="check" value="{$v.id}">
                                        </td>
                                        <td ><?php echo $v['user_name']?></td>
                                        <td ><?php echo $v['phone']?></td>
                                        <td ><?php if($v['sex']==1):?>
                                            男
                                            <?php else:?>
                                            女
                                            <?php endif;?></td>
                                        <td ><?php echo $v['user_card']?></td>
                                        <td ><?php echo $v['address']?></td>
                                        <td ><?php echo $v['user_price']?>￥</td>
                                        <td ><?php echo $v['point']?></td>
                                        <td ><?php if($v['reg_time']>0) echo date('Y-m-d H:i',$v['reg_time']);?></td>
                                        <td>
                                            <a href="{:U('Admin/User/addPrice')}?user_id= {$v['id']}" class="btn" rel="tooltip" title="充值"><i class="icon-plus"></i>充值</a>
                                            <a href="{:U('Admin/User/addRoom')}?user_id= {$v['id']}" class="btn" rel="tooltip" title="添加开房记录"><i class="icon-plus"></i>添加开房记录</a>

                                           </td>
                                    </tr>

                                </foreach>
                                <if condition="($count eq 0) ">
                                    <tr><td align="center" colspan="11">暂无记录</td></tr>
                                </if>
                                </tbody>
                            </table>
                            <div class="row-fluid">
                                <div class="span4">
                                    <div class="dataTables_info">
                                        <if condition="($count gt 0) ">
                                            共{$count}条记录，当前第{$nowPage}/{$totalPages}页
                                        </if>
                                    </div>
                                </div>
                                <div class="span8">
                                    {$page}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
</body>
</html>